<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let arr = [[60, 77, 88], [60, 70, 98], [40, 57, 88], [60, 37, 68], [50, 87, 80], [100, 99, 88], [67, 87, 58], [60, 37, 88], [20, 70, 88], [60, 77, 88]];
    //请统计大于等于平均成绩的人数
    //求平均成绩
    let sum = 0;
    for (let i = 0; i < arr.length; i++) {
        sum += arr[i].reduce(function (per, cur, index, arr) {
            return per + cur;
        })
    }
    console.log(sum)
    let p = sum / (arr.length);
    console.log("平均成绩:"+p);
    let news = arr.filter(function (value, index, arr) {
        let s = value.reduce(function (per, cur, index, arr) {
            return per + cur;
        })
        return s >= p;
    })
    console.log(news.length,news);

</script>
</body>
</html>